#include "SMPPDestAddrSubunit.hpp"

using namespace smpp::pdu;

DestAddrSubunit::DestAddrSubunit(const quint8 nValue):
TLV(TLVtags::TAG_DEST_ADDR_SUBUNIT,1),_Value(nValue){}

DestAddrSubunit::DestAddrSubunit(const DestAddrSubunit &nDestAddrSubunit):
TLV(nDestAddrSubunit),_Value(nDestAddrSubunit.getValue()){}

bool DestAddrSubunit::operator ==(
	const DestAddrSubunit &nDestAddrSubunit) const{
	return (TLV::operator == (nDestAddrSubunit) && 
			_Value == nDestAddrSubunit.getValue());
}

bool DestAddrSubunit::operator !=(
	const DestAddrSubunit &nDestAddrSubunit) const{
	return !this->operator == (nDestAddrSubunit);
}

DestAddrSubunit &DestAddrSubunit::operator = (
	const DestAddrSubunit &nDestAddrSubunit){
	if(*this == nDestAddrSubunit)
		return *this;
	TLV::operator = (nDestAddrSubunit);
	_Value = nDestAddrSubunit.getValue();
	return *this;
}

void DestAddrSubunit::setValue(const quint8 nValue){
	_Value = nValue;
}

const quint8 DestAddrSubunit::getValue() const{
	return _Value;
}
